package com.minivision.fdiot.rate.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Getter;
import lombok.Setter;

import javax.annotation.PostConstruct;
import java.util.Arrays;

/**
 * 是否限流黑白名单配置
 * @author hughzhao
 * @2018年3月2日
 */
@Getter
@Setter
@Component
@ConfigurationProperties("inspection")
public class InspectionProperties {

    private String[] whiteList;

    private String[] blackList;

    @PostConstruct
    public void init(){
        Arrays.sort(whiteList);
        Arrays.sort(blackList);
    }

}
